<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="include :: header"></head>
<body class="hold-transition skin-blue sidebar-mini">
<!--修改审核人-->
<section class="content-header">
    <h1>铆焊工时审核</h1>
</section>
<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    <form id="queryForm" onsubmit="return false;">
                        <div class="row">
                            <div class="form-inline">
                                <div class="form-group">
                                    <label for="query-proCode">项目编号</label>
                                    <input id="query-proCode" type="text" name="fkCode" class="form-control"
                                           placeholder="请输入项目编号">
                                </div>
                                <div class="form-group">
                                    <label for="query-proName">项目名称</label>
                                    <input id="query-proName" type="text" name="name" class="form-control"
                                           placeholder="请输入项目名称">
                                </div>
                                <div class="form-group">
                                    <label for="query-part">部分</label>
                                    <input id="query-part" type="text" name="partName" class="form-control"
                                           placeholder="请输入部分">
                                </div>
                                <div class="form-group">
                                    <label for="query-rejectStatus">状态</label>
                                    <select id="query-rejectStatus" class="form-control" name="status">
                                        <option value="">请选择</option>
                                        <option value="0" selected>未审核</option>
                                        <option value="1">已审核</option>
                                        <option value="2">驳回</option>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label for="query-postName">登记人</label>
                                    <input id="query-postName" type="text" name="inputUser" class="form-control"
                                           placeholder="请输入登记人">
                                </div>
                                <div class="form-group">
                                    <label for="query-startTime">登记日期</label>
                                    <input id="query-startTime" type="text" class="form-control datepicker" name="data"
                                           readonly="readonly"/>
                                    <label for="query-endTime"> 至 </label>
                                    <input id="query-endTime" type="text" class="form-control datepicker" name="data"
                                           readonly="readonly"/>
                                </div>
                                <button type="button" class="btn btn-success" id="btn-search"
                                        onclick="js.table.search(table)">
                                    <span class="Bold">搜索</span>
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="box-body">
                    <table id="bootstrap-table"></table>
                </div>
            </div>
        </div>
    </div>
</section>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
    $(function () {
        /** 加载列表 */

        table = js.table.init({
            url: ctx + "est/dataEntry/solderingCheck/list",
            showExport: false,
            columns: [
                {title: '序号', field: 'id', width: '50px',
                    formatter: function (value, row, index) {
                        return index + 1;
                    }
                },
                {title: "项目编号", field: 'fkCode'},
                {title: "项目名称", field: 'name'},
                {title: "车间", field: 'address'},
                {title: "项目数量", field: 'num'},
                {
                    title: "类型", field: 'specialId',
                    formatter: function (value, row, index, field) {
                        if (value == 60) {
                            return '机械';
                        } else if (value == 61) {
                            return '流体';
                        } else if (value == 62) {
                            return '自动化'
                        }
                    }
                },
                {title: "部分", field: 'partName'},

                {title: "登记人", field: 'inputUser'},
                {title: "登记日期", field: 'data'},
                {
                    title: "审核状态", field: 'status',
                    formatter: function (value, row, index, field) {
                        if (value == 0) {
                            return '<span class="badge label-inverse">未审核</span>';
                        } else if (value == 1) {
                            return '<span class="badge label-success">已审核</span>';
                        } else if (value == 2) {
                            return '<span class="badge label-danger">驳回</span>'
                        }
                    }
                },

                {
                    title: '操作',
                    formatter: function (value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-warning btn-xs"  href="' + ctx + 'est/dataEntry/solderingCheck/verify/' + row.fkCode +'/'+ row.partName +'/'+ row.specialId + '"> 审核</a> ');
                        return actions.join('');
                    }
                }
            ]
        });
        js.modal.hideEvent("modal-edit", function () {
            js.validate.reset("editForm");
            js.reset("editForm");
        });

    });
</script>
</body>
</html>
